$(function() {
    var params = new URLSearchParams(window.location.search);
    var sort = params.get('sort');
    var sort_asc = params.get('sort_asc');
    if (sort && sort_asc) $('.' + sort + '.search-arrow').addClass(sort_asc == 'asc' ? 'arrow-up' : 'arrow-down');
});